home *** CD-ROM | disk | FTP | other *** search
- Path: airdmhor.gen.nz!not-for-mail
- From: gumboot@airdmhor.gen.nz (Simon Hosie)
- Newsgroups: comp.arch.arithmetic,comp.lang.c,comp.lang.c++
- Subject: Re: Access carry flag from C
- Followup-To: comp.arch.arithmetic,comp.lang.c,comp.lang.c++
- Date: 26 Feb 1996 10:06:21 +1300
- Organization: Airdmhor : a couple of BBS's, a bunch of people, and a cat.
- Message-ID: <4gqj0d$d6p@airdmhor.gen.nz>
- References: <Dn1C9z.DGv.0.net@indra.com> <ARTHUR.96Feb20143404@gold.Smallworld.co.uk> <824853272snz@genesis.demon.co.uk>
- NNTP-Posting-Host: airdmhor.gen.nz
- X-Newsreader: TIN [version 1.2 PL2]
-
- Lawrence Kirby:
- > It certainly can be done portably although not with the efficiency that
- > a platform-specific solution is likely to give you.
-
- > int j, k;
-
- > ...
-
- > if ((j >= 0) ? (k > INT_MAX-j) : (k < INT_MIN-j))
- ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
- Won't they both be evaluated?
-